package com.example.mybatis.demo.mapper;


import com.example.mybatis.demo.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ArticleInfoMapper {
    @Select("SELECT ta.id,ta.content,ta.uid,tb.username,tb.age,tb.gender " +
        "From article_info ta " +
        "LEFT JOIN user_info tb ON ta.uid=tb.id " +
        "WHERE ta.id=#{id}")
    ArticleInfo selectArticleInfoAndUserInfo(Integer id);


}
